package me.gavin.net

import com.google.gson.annotations.SerializedName
import me.gavin.base.IgnoredOnProguard

@IgnoredOnProguard
data class Result<T>(val code: Int, val info: String, val data: T) {

    val isSuccess get() = code == 888

    val noLogin get() = code == 302

    val noUser get() = code == 303

    val noAuth get() = code == 304

    val needCodeI get() = code == 104
}

@IgnoredOnProguard
data class Pager<T>(val total: Int, @SerializedName("data", alternate = ["lists"]) val data: List<T>)